package cn.dev.admin.listener;
/**
 * @author LiuRenGang
 * @date 2022/07/07 08:14
 **/

import cn.dev.admin.constant.MqConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@EnableRabbit
@Slf4j
public class MqListener {


    @RabbitListener(queues = MqConstant.QUEUE_TEST_HELLO)
    @RabbitHandler
    public void getTestMsg(String msg) {
        log.info("---------->接收到的消息:{}", msg);
    }


    @RabbitListener(queues = MqConstant.SYN_CASE_TO_ES_QUEUE)
    @RabbitHandler
    public void synAddressToEsQueue(String msg) {
        log.info("---------->SYN_CASE_TO_ES_QUEUE:{}", msg);
    }


}
